import request from '@/utils/request'

// 查询所有
export function selectAll(params) {
  return request({
    url: `/pet/listPetAll/${params}`,
    method: 'get',
  })
}
// 查询所有年龄
export function selectAllAge() {
  return request({
    url: '/petage/findAll',
    method: 'get'
  })
}
// 修改
export function update(query) {
  console.log(query)
  return request({
    url: '/pet/updatePet',
    method: 'put',
    data: query
  })
}
// 删除
export function del(petId) {
  return request({
    url: '/pet/deletePet',
    method: 'delete',
    params: { petId }
  })
}
// 根据类型查询
export function searchByName(petName, pageNum) {
  return request({
    url: `/pet/findByNameAll/${pageNum}`,
    method: 'get',
    params: { petName }
  })
}

